namespace ArivisTests.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class AddedTestResults : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.TestResult",
                c => new
                    {
                        Id = c.Int(nullable: false, identity: true),
                        Name = c.String(nullable: false),
                    })
                .PrimaryKey(t => t.Id);
            
            AddColumn("dbo.TestCase", "Name", c => c.String(nullable: false));
            AddColumn("dbo.TestCase", "Result_Id", c => c.Int());
            AddForeignKey("dbo.TestCase", "Result_Id", "dbo.TestResult", "Id");
            CreateIndex("dbo.TestCase", "Result_Id");
        }
        
        public override void Down()
        {
            DropIndex("dbo.TestCase", new[] { "Result_Id" });
            DropForeignKey("dbo.TestCase", "Result_Id", "dbo.TestResult");
            DropColumn("dbo.TestCase", "Result_Id");
            DropColumn("dbo.TestCase", "Name");
            DropTable("dbo.TestResult");
        }
    }
}
